/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Project: javase202202 - Op8
 * <p>Powered by Lisi On 2022-05-27 16:56:30
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Op8 {
    public static void main(String[] args) {
        //0x 十六进制 0 - f  10
        System.out.println(0xff); //输出的是10进制 255
        System.out.println(0x10); //16

        //将10进制转换为2进制字符串，并输出 10 3 = 2 11
        System.out.println(Integer.toBinaryString(3)); //11 2进制
        System.out.println(Integer.toHexString(255));//ff  16进制
        System.out.println(Integer.toOctalString(10));//12  8进制

        System.out.println(Integer.valueOf("11",2));//3 10进制
        System.out.println(Integer.valueOf("ff",16));//255 10进制
        System.out.println(Integer.valueOf("12",8));//10 10进制

        System.out.println(12);//12
        System.out.println(0x12); //16进制12 转10进制结果18输出
        System.out.println(0b111); //7
        System.out.println(010);//8


        System.out.println(12&4); //4

        System.out.println(15>>1<<2);//28
        System.out.println(Integer.toBinaryString(15));//00011100



    }
}
